package org.bbelovic.devel.pexeso.gui;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

public class PairsMouseListener implements MouseListener {


    public void mouseClicked(MouseEvent e) {
        handleMouseClicked(e);
    }

    private void handleMouseClicked(MouseEvent e) {

//        System.out.println("Actual player: " + p);
//        if (p.getActionPoints() > 0) {
            Object source = e.getSource();
            PairsLabel label = (PairsLabel) source;
//            System.out.println("name="+ label.getName());
            label.turnFlagIcon();
//            p.decrementActionPoints();
//            p.addPair(label);
//            final String msg = "Player "+ p +" turned flag "+ label.getName().substring(0, label.getName().lastIndexOf("."));
//            System.out.println(msg);
//            if (p.getActionPoints() == 0) {
//                System.out.println("Calling controller");

//            }
//        }
    }

    public void mousePressed(MouseEvent e) {
        
    }

    public void mouseReleased(MouseEvent e) {
        // TODO Auto-generated method stub
        
    }

    public void mouseEntered(MouseEvent e) {
        // TODO Auto-generated method stub
        
    }

    public void mouseExited(MouseEvent e) {
        // TODO Auto-generated method stub
        
    }



}
